package com.wc.AlgoOJ._思维.CT0102_彩色球;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2024/4/5 23:21
 * @description http://43.138.190.70:8888/p/CT0102
 */
public class Main {
    static int t, r, g, b, w;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        t = sc.nextInt();
        while (t-- > 0) {
            int odd = 0;
            int zero = 0;
            r = sc.nextInt();
            g = sc.nextInt();
            b = sc.nextInt();
            w = sc.nextInt();
            if ((r & 1) == 1) odd++;
            if ((g & 1) == 1) odd++;
            if ((b & 1) == 1) odd++;
            if (r == 0) zero++;
            if (g == 0) zero++;
            if (b == 0) zero++;
//            if ((w & 1) == 1) odd++;
            if (odd == 1 && (w & 1) == 0) {
                System.out.println("Yes");
            } else if (zero == 0 && odd == 2 && (w & 1) == 1) {
                System.out.println("Yes");
            } else if (odd == 3 || odd == 0) {
                System.out.println("Yes");
            } else System.out.println("No");
        }
    }
}
